import axios from 'axios'
import MockAdapter from 'axios-mock-adapter';
import loginlogs from '../../staticData/logs';
import loginlogsJSON from '../../staticData/logs.json';
// mock.onGet(/\/^api/).passThrough()
// const loginlogsData = loginlogs
// const loginlogsData = JSON.stringify(loginlogsJSON)
const loginlogsData = loginlogsJSON
function logsMock() {
    let mock = new MockAdapter(axios)
    mock.onPost('/api/logs').reply(config => {
        let data = JSON.parse(config.data);
        console.log(data)
        return [200, loginlogsData];
    });
}

export default logsMock